function C_L1 = GPS_L1_CACode(s)
    C_L1 = [];
    
    G1 = [1 1 1 1 1 1 1 1 1 1];
    G2 = [1 1 1 1 1 1 1 1 1 1];
    
    for cnt = 1:1023
        C_L1(cnt) = mod(G1(10) + G2(s(1)) + G2(s(2)), 2);
        temp1 =  mod(G1(3)+G1(10), 2);
        G1(2:10) = G1(1:9);
        G1(1) = temp1;
        
        temp2 = mod(G2(2)+G2(3)+G2(6)+G2(8)+G2(9)+G2(10), 2);
        G2(2:10) = G2(1:9);
        G2(1) = temp2;
    end
    
end




